import 'package:flutter/cupertino.dart';

class CountProvider extends ChangeNotifier{
  int _count = 0;

  int get count => _count;

  set count(int value) {
    _count = value;
  }

  void add(){
    _count++;
    notifyListeners(); //观察者状态刷新
  }

  void clear(){
    _count--;
    notifyListeners(); //观察者状态刷新
  }
}